<template>
	<view>
		<uni-nav-bar background-color="" class="nav" statusBar :border="false" left-icon="back" tit title="分销员"
			@clickLeft="goback"></uni-nav-bar>
		<view class="mine_top">
			<image class="imgs" src="/static/mine/bjj.png" mode="aspectFill"></image>
			<view class="top_box">
				<view class="img_flex">
					<image v-if="userInfo.member.avatar" :src="http+userInfo.member.avatar" mode="aspectFill"></image>
					<image v-else src="/static/tou.jpg" mode="aspectFill"></image>
					<view class="texts">
						{{userInfo.member.nickname}}
					</view>
				</view>
			</view>
		</view>
		<view class="mine_2">
			<image class="img" src="/static/mine/fx4.png" mode=""></image>
			<view class="imgabs">
				<view class="price">
					<view class="">
						<view class="t1">账户余额(元)</view>
						<view class="t2">{{userInfo.member.distribution_price}}</view>
					</view>
					<view class="btn" @click="txian">
						提现
					</view>
				</view>
				<view class="price2">
					<view class="">
						<view class="t1">今日佣金(元)</view>
						<view class="t2">{{userInfo.today_order_price}}</view>
					</view>
					<view class="x"></view>
					<view class="">
						<view class="t1">合计税费(元)</view>
						<view class="t2">{{userInfo.all_commission_price}}</view>
					</view>
				</view>
			</view>
		</view>
		<view class="mine_3">
			<image src="/static/mine/fx5.png" mode="" @click="gouser"></image>
			<image src="/static/mine/fx6.png" mode="" @click="gouser1"></image>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				userInfo:{},
				http: this.$httpimg,
			};
		},
		onLoad() {
			this.$post('distribution/index', {
				mid:uni.getStorageSync('msg').id
			}).then(res => {
				if (res.code == 0) {
					this.userInfo = res.data
				}
			})
		},
		methods:{
			goback() {
				uni.navigateBack()
			},
			gouser(){
				uni.navigateTo({
					url:'/minepage/userinfo'
				})
			},
			gouser1(){
				uni.navigateTo({
					url:'/minepage/zdinfo'
				})
			},
			txian(){
				uni.navigateTo({
					url:'/minepage/tx'
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: #F8F8F8;
	}
	.nav {
		width: 100%;
		position: absolute;
		top: 0%;
		z-index: 9;
	}
	.mine_top{
		position: relative;
		.imgs {
			width: 100%;
			height: 350rpx;
			position: relative;
		}
		.top_box{
			width: 100%;
			height: 350rpx;
			position: absolute;
			top: 0%;
			.img_flex{
				display: flex;
				align-items: center;
				position: absolute;
				bottom: 44rpx;
				left: 60rpx;
				image{
					width: 100rpx;
					height: 100rpx;
					border-radius: 50rpx;
				}
				.texts{
					font-family: PingFang SC, PingFang SC;
					font-weight: bold;
					font-size: 52rpx;
					color: #000000;
					margin-left: 20rpx;
				}
			}
			
		}
	}
	.mine_2{
		width: 710rpx;
		height: 300rpx;
		margin: -20rpx auto;
		position: relative;
		.img{
			width: 710rpx;
			height: 300rpx;
		}
		.imgabs{
			width: 710rpx;
			height: 300rpx;
			position: absolute;
			top: 0;
			padding: 30rpx 34rpx;
			box-sizing: border-box;
			.price{
				display: flex;
				justify-content: space-between;
				.t1{
					font-family: PingFang SC, PingFang SC;
					font-weight: bold;
					font-size: 30rpx;
					color: #FFFFFF;
				}
				.t2{
					margin-top: 5rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: bold;
					font-size: 64rpx;
					color: #FFFFFF;
				}
				.btn{
					width: 168rpx;
					height: 68rpx;
					background: linear-gradient( 90deg, #454256 0%, #080F21 100%);
					border-radius: 34rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: bold;
					font-size: 30rpx;
					color: #FFFFFF;
					line-height: 68rpx;
					text-align: center;
					margin-top: 20rpx;
				}
			}
			
			.price2{
				display: flex;
				margin-top: 20rpx;
				align-items: center;
				.x{
					width: 2rpx;
					height: 60rpx;
					background: #fff;
					margin: 0rpx 40rpx;
				}
				.t1{
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 28rpx;
					color: #FFFFFF;
				}
				.t2{
					font-family: PingFang SC, PingFang SC;
					font-weight: bold;
					font-size: 36rpx;
					color: #FFFFFF;
				}
				
			}
		}
	}
    .mine_3{
		margin: 40rpx auto;
		width: 710rpx;
		display: flex;
		justify-content: space-between;
		image{
			width: 340rpx;
			height: 300rpx;
		}
	}
</style>